<template>
  <view class="page">
    <view class="content text-24">
      <view class="tab-item">{{ `招生简章` }}</view>
      <!-- <view v-html="item1.content"></view> -->
      <!-- <rich-text :nodes="content"></rich-text> -->
      <u-parse :content="content"></u-parse>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      navList: [],
      qryBrochList: [],
      qrySpecList: [],
      qryAdmissionList: [],
      curNav: 0,
      schoolCode: "",
      content: "",
      schoolData: {},
      size: 10,
      current: 1,
      total: 10,
    };
  },
  onLoad(options) {
    // this.content = options.content || "<h1>=123=</h1><h1>12312</h1>";
    if (options.content) {
      var content = decodeURIComponent(options.content) || "";
      // console.log("content==", content);
      this.content = content;
    }
    // this.getList();
    // this.qryBrochuresList();
    // this.qrySpecialtysList();
    // this.qryAdmissionPlanList();
  },
  onShow() {},
  onReachBottom() {},
  methods: {
    changeNav(i) {
      this.curNav = i;
    },
    toStart(item) {
      //   uni.showToast({
      //     icon: 'none',
      //     title: `${curData.name}的数量为${curData.num}`
      //   })
      getApp().globalData.schoolCode = this.schoolCode;
      getApp().globalData.schoolName = this.schoolData.name;
      uni.navigateTo({
        url: "/pages/special/specialList" + "?schoolCode=" + this.schoolCode,
      });
    },

    getList() {
      this.$http
        .get1("/client/undergraduate/schoolDetail", {
          schoolCode: this.schoolCode,
          examType: 12,
        })
        .then((res) => {
          if (res.code == 200) {
            this.schoolData = res.data;
          }
        });
    },
    // 获取专升本学校招生简章
    qryBrochuresList() {
      this.$http
        .get1("/client/undergraduate/qryBrochures", {
          schoolCode: this.schoolCode,
          examType: 12,
        })
        .then((res) => {
          // console.log(res);
          if (res.code == 200) {
            this.qryBrochList = res.data;
          }
        });
    },
    // 获取专升本学校专业列表
    qrySpecialtysList() {
      this.$http
        .get1("/client/undergraduate/qrySpecialtys", {
          schoolCode: this.schoolCode,
          examType: 12,
        })
        .then((res) => {
          if (res.code == 200) {
            this.qrySpecList = res.data;
          }
        });
    },

    // 获取专升本学校招生计划列表
    qryAdmissionPlanList() {
      this.$http
        .get1("/client/undergraduate/qryAdmissionPlan", {
          schoolCode: this.schoolCode,
          // "specialtyIds[0]": 112,
          // "specialtyIds[1]": 113,
          specialtyIds: "",
          examType: 12,
        })
        .then((res) => {
          // console.log(res);
          if (res.code == 200) {
            this.qryAdmissionList = res.data;
          }
        });
    },
  },
};
</script>

<style lang="scss">
page {
  background-color: #f2f3f8;
}
.page {
  padding: 50rpx 30rpx 200rpx;
  box-sizing: border-box;
}

.content {
  width: 100%;
  min-height: 120rpx;
  background: #ffffff;
  box-shadow: 0rpx 4rpx 8rpx 2rpx rgba(42, 65, 152, 0.05);
  border-radius: 20rpx;
  margin-bottom: 20rpx;
  padding: 30rpx 30rpx;
  box-sizing: border-box;
  .word {
    font-size: 30rpx;
    font-weight: bold;
    color: #333333;
  }
  .word-item {
    background-color: #5480f8;
    border-radius: 10rpx;
    margin-right: 12rpx;
    font-size: 24rpx;
    font-weight: 400;
    padding: 4rpx 10rpx;
    margin-top: 10rpx;
  }
  .mean {
    margin-left: 0rpx;

    font-size: 24rpx;
    color: #575a64;
  }

  .tab-item {
    // background-color: #5480f8;
    // border-radius: 10rpx;
    font-size: 28rpx;
    font-weight: 400;
    padding: 2rpx 20rpx;
    // color: #ffffff;
    border-left: 8rpx solid #5480f8;
  }
}
.page-btn {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 176rpx;
  padding: 30rpx 62rpx;
  box-sizing: border-box;
  background-color: #fff;
  z-index: 10;
  .btn {
    width: 100%;
    height: 90rpx;
    background: #5480f8;
    border-radius: 46rpx;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 32rpx;
    font-weight: 500;
    color: #ffffff;
    &.disable {
      background-color: #cad8fc;
    }
  }
}
</style>
